home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cug232 / bytearra.st < prev    next >
Text File  |  1987-06-17  |  384b  |  22 lines

  1. Class ByteArray :ArrayedCollection
  2. [
  3.     new: size
  4.         ^ <NewByteArray size>
  5. |
  6.     at: index
  7.         ^ <ByteArrayAt self index>
  8. |
  9.     at: index put: value
  10.         <ByteArrayAtPut self index value>
  11. |
  12.     printString    | str |
  13.         str <- '#[ '.
  14.         (1 to: self size)
  15.             do: [:i | str <- str , (self at: i) printString , ' '].
  16.         ^ str , ']'
  17. |
  18.     size
  19.         ^ <ByteArraySize self>
  20. ]
  21.  
  22.